package cn.diancan.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Version;

import cn.diancan.util.DateUtil;

/**
 * 图片
 * @author Sky
 *
 */
@Entity
public class ImageFileA {

	private Long id;
	private String dirCode;
	private String srcFileName;
	private String fileType;
	private Long fileLength;
	private String uploadTime;
	private String signCode;
	private Integer isDelete;//0未删除 //2标记删除 //1已删除
	private Integer version;
	    
        @Version
        @Column(name = "OPTLOCK", columnDefinition = "int(11) DEFAULT 0")
        public Integer getVersion() {
    	return version;
        }
    
        public void setVersion(Integer version) {
    	this.version = version;
        }
        
	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getDirCode() {
		return dirCode;
	}
	public void setDirCode(String dirCode) {
		this.dirCode = dirCode;
	}
	public String getSrcFileName() {
		return srcFileName;
	}
	public void setSrcFileName(String srcFileName) {
		this.srcFileName = srcFileName;
	}
	public String getFileType() {
		return fileType;
	}
	public void setFileType(String fileType) {
		this.fileType = fileType;
	}
	public Long getFileLength() {
		return fileLength;
	}
	public void setFileLength(Long fileLength) {
		this.fileLength = fileLength;
	}
	@Column(name="uploadTime",columnDefinition="DATETIME",length=19)
	public String getUploadTime() {
	    return DateUtil.getMysqlDateTime(uploadTime);
	}
	public void setUploadTime(String uploadTime) {
		this.uploadTime = uploadTime;
	}
	public Integer getIsDelete() {
		return isDelete;
	}
	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}
	public String getSignCode() {
	    return signCode;
	}
	public void setSignCode(String signCode) {
	    this.signCode = signCode;
	}
	
	
	 
	
}
